import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
export default new Vuex.Store({
    state: {
        user: '',
        status: 404,
        width: 1200,
        contentData: {
            title: "",
            content: "",
            classify: "web",
            share: "0"
        }
    },
    mutations: {
        status(state, data) { //state固定值，（status第二个自定义
            state.status = data;
        },
        user(state, data) { //state固定值，（status第二个自定义
            state.user = data;
        },
        width(state, data) { //state固定值，（status第二个自定义
            state.width = data;
        },
        contentData(state, data) { //state固定值，（status第二个自定义
            state.contentData = data;
        },
    },
    actions: {

    }
})